package pojo;

import org.springframework.beans.factory.annotation.Required;

/**
 * @Author: fancyears·milos·malvis
 * @Description:
 * @Date: Created in  2019/4/19 13:42
 * @Modified By:
 */
public class SimplePlayer {
    /**
     * @Required 注释应用于 bean 属性的 setter 方法，它表明受影响的 bean 属性在配置时必须放在 XML 配置文件中，否则容器就会抛出一个 BeanInitializationException 异常
     * 不过这个注解貌似废除了，体现不出来报异常的效果
     */
    private String id;
    private int hp;
    private int mp;

    public String getId() {
        return id;
    }

    @Required
    public void setId(String id) {
        this.id = id;
    }

    public int getHp() {
        return hp;
    }

    @Required
    public void setHp(int hp) {
        this.hp = hp;
    }

    public int getMp() {
        return mp;
    }

    @Required
    public void setMp(int mp) {
        this.mp = mp;
    }
}
